package com.itheima.pojo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description  
 * @Author  Hunter
 * @Date 2020-08-03 
 */

@Setter
@Getter
@ToString
@Entity
@Table ( name ="t_category_menu" )
public class CategoryMenu  implements Serializable {

	private static final long serialVersionUID =  7115147144258725081L;

	/**
	 * 唯一uid
	 */

	@Id
   	@Column(name = "uid" )
	private String uid;

	/**
	 * 菜单名称
	 */
   	@Column(name = "name" )
	private String name;

	/**
	 * 菜单级别
	 */
   	@Column(name = "menu_level" )
	private Integer menuLevel;

	/**
	 * 简介
	 */
   	@Column(name = "summary" )
	private String summary;

	/**
	 * 父uid
	 */
   	@Column(name = "parent_uid" )
	private String parentUid;

	/**
	 * url地址
	 */
   	@Column(name = "url" )
	private String url;

	/**
	 * 图标
	 */
   	@Column(name = "icon" )
	private String icon;

	/**
	 * 排序字段，越大越靠前
	 */
   	@Column(name = "sort" )
	private Long sort;

	/**
	 * 状态
	 */
   	@Column(name = "status" )
	private Integer status;

	/**
	 * 创建时间
	 */
   	@Column(name = "create_time" )
	private Date createTime;

	/**
	 * 更新时间
	 */
   	@Column(name = "update_time" )
	private Date updateTime;

	/**
	 * 是否显示 1:是 0:否
	 */
   	@Column(name = "is_show" )
	private Integer isShow;

	/**
	 * 菜单类型 0: 菜单   1: 按钮
	 */
   	@Column(name = "menu_type" )
	private Integer menuType;

   	@Transient
   	private List<CategoryMenu> childCategoryMenu;

	public List<CategoryMenu> getChildCategoryMenu() {
		return childCategoryMenu;
	}

	public void setChildCategoryMenu(List<CategoryMenu> childCategoryMenu) {
		this.childCategoryMenu = childCategoryMenu;
	}
}
